package com.murray.assignment.pojo;

import org.apache.solr.client.solrj.beans.Field;

import java.io.Serializable;
import java.util.List;

/**
 * @author Murray
 * @Date 2021/6/12
 * @Time 22:41
 */
public class Goods implements Serializable {
    public Goods() {
    }



    public String getCid() {
        return cid;
    }

    public void setCid(String cid) {
        this.cid = cid;
    }

    public Integer getBrandId() {
        return brandId;
    }

    public void setBrandId(Integer brandId) {
        this.brandId = brandId;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getKeywords() {
        return keywords;
    }

    public void setKeywords(String keywords) {
        this.keywords = keywords;
    }

    public double getMarketPrice() {
        return marketPrice;
    }

    public void setMarketPrice(double marketPrice) {
        this.marketPrice = marketPrice;
    }

    public double getSalesPrice() {
        return salesPrice;
    }

    public void setSalesPrice(double salesPrice) {
        this.salesPrice = salesPrice;
    }

    public Integer getIsSales() {
        return isSales;
    }

    public void setIsSales(Integer isSales) {
        this.isSales = isSales;
    }

    public Integer getIsNew() {
        return isNew;
    }

    public void setIsNew(Integer isNew) {
        this.isNew = isNew;
    }

    public Integer getIsHot() {
        return isHot;
    }

    public void setIsHot(Integer isHot) {
        this.isHot = isHot;
    }

    public Integer getIsShow() {
        return isShow;
    }

    public void setIsShow(Integer isShow) {
        this.isShow = isShow;
    }

    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    public String getThumbImg() {
        return thumbImg;
    }

    public void setThumbImg(String thumbImg) {
        this.thumbImg = thumbImg;
    }

    public String getGoodsImg() {
        return goodsImg;
    }

    public void setGoodsImg(String goodsImg) {
        this.goodsImg = goodsImg;
    }

    public Goods(Integer goodsId, Integer cid, Integer brandId, String goodsName, String keywords, double marketPrice, double salesPrice, Integer isSales, Integer isNew, Integer isHot, Integer isShow, Integer isDelete, String thumbImg, String goodsImg) {
        this.brandId = brandId;
        this.goodsName = goodsName;
        this.keywords = keywords;
        this.marketPrice = marketPrice;
        this.salesPrice = salesPrice;
        this.isSales = isSales;
        this.isNew = isNew;
        this.isHot = isHot;
        this.isShow = isShow;
        this.isDelete = isDelete;
        this.thumbImg = thumbImg;
        this.goodsImg = goodsImg;
    }

    /**
     * 商品的id，也就是主键
     */
    @Field("id")
    private String goodsId;
    /**
     * 种类id，对应的是category表的主键
     */
    private String cid;
    /**
     * 品牌id
     */
    private Integer brandId;
    /**
     * 商品名称
     */
    @Field
    private String goodsName;

    /**
     * 描述商品关键字
     */
    private String keywords;

    /**
     * 商品市场价格
     */
    private double marketPrice;
    /**
     * 销售价格
     */
    @Field
    private double salesPrice;
    /**
     * 是否在售，1表示在售，0表示不在售
     */
    private Integer isSales;
    /**
     * 是否是新品，1是0否
     */
    private Integer isNew;
    /**
     * 是否热销，1是0否
     */
    private Integer isHot;
    /**
     * 是否在展示1是0否
     */
    private Integer isShow;
    /**
     * 是否删除1是0否
     */
    private Integer isDelete;
    /**
     * 缩略图地址
     */
    private String thumbImg;
    /**
     * 商品地址
     */
    @Field
    private String goodsImg;

    /**
     * 销量
     */
    @Field
    private Integer salesNum;

    @Override
    public String toString() {
        return "Goods{" +
                "goodsId='" + goodsId + '\'' +
                ", cid='" + cid + '\'' +
                ", brandId=" + brandId +
                ", goodsName='" + goodsName + '\'' +
                ", keywords='" + keywords + '\'' +
                ", marketPrice=" + marketPrice +
                ", salesPrice=" + salesPrice +
                ", isSales=" + isSales +
                ", isNew=" + isNew +
                ", isHot=" + isHot +
                ", isShow=" + isShow +
                ", isDelete=" + isDelete +
                ", thumbImg='" + thumbImg + '\'' +
                ", goodsImg='" + goodsImg + '\'' +
                ", salesNum=" + salesNum +
                ", attrNameList=" + attrNameList +
                '}';
    }

    public List<AttrName> getAttrNameList() {
        return attrNameList;
    }

    public void setAttrNameList(List<AttrName> attrNameList) {
        this.attrNameList = attrNameList;
    }

    /**
     * 商品中包含的属性信息
     */
    private List<AttrName> attrNameList;

    public Integer getSalesNum() {
        return salesNum;
    }

    public void setSalesNum(Integer salesNum) {
        this.salesNum = salesNum;
    }

    public String getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(String goodsId) {
        this.goodsId = goodsId;
    }

    public Goods(String goodsId, String cid, Integer brandId, String goodsName, String keywords, double marketPrice, double salesPrice, Integer isSales, Integer isNew, Integer isHot, Integer isShow, Integer isDelete, String thumbImg, String goodsImg, Integer salesNum) {
        this.goodsId = goodsId;
        this.cid = cid;
        this.brandId = brandId;
        this.goodsName = goodsName;
        this.keywords = keywords;
        this.marketPrice = marketPrice;
        this.salesPrice = salesPrice;
        this.isSales = isSales;
        this.isNew = isNew;
        this.isHot = isHot;
        this.isShow = isShow;
        this.isDelete = isDelete;
        this.thumbImg = thumbImg;
        this.goodsImg = goodsImg;
        this.salesNum = salesNum;
    }
}
